package cn.gjculture.shopping.api.dao;

import cn.gjculture.shopping.api.entity.FileEntity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface FileDao {
    @Insert("INSERT INTO file(fileId,fileName,filePath,serverUrl,status,insertTime,updateTime)\n" +
            "       values(#{fileId},#{fileName},#{filePath},#{serverUrl},#{status},#{insertTime},#{updateTime})")
    public int insert(FileEntity file);

    @Delete("delete from file where fileId=#{fileId}")
    public int delete(String fileId);

    @Select("select * from file where fileId=#{fileId}")
    public FileEntity queryById(String fileId);

}
